﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCLHShenQingXX_TK.ascx.cs" Inherits="Web.Controls.LAIHAN.UCLHShenQingXX_TK" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<style type="text/css">
   
</style>
<%--<script src="../../JS/layui/layui.js" defer="defer"></script>
<link href="../../JS/layui/css/layui.css" rel="stylesheet" />--%>
<%--<script src="../../JS/layer/layer.js"></script>--%>
<script type="text/javascript">
    function openFaPiao() {
        if (UCLHShenQingXX_TK_hdCollection.Get("I_FEIYONGBH") == 'undefined') {
            return;
        }
        var url = "/Pages/YongShui/0.GongGongCKYM/FaPiaoHMLIST.aspx?I_FEIYONGBH=" + UCLHShenQingXX_TK_hdCollection.Get("I_FEIYONGBH");
        window.open(url, '', 'width=700,height=600');
        //var width = 600;
        //var height = 400;
        //layer.open({
        //    type: 2,
        //    title: "",
        //    shadeClose: false,
        //    shade: 0.8,
        //    area: [width + "px", height + "px"],
        //    content: url,
        //    end: function () {
        //        alert("11");
        //    }
        //});
    }
    function SelectFapiaohm(fphm)
    {
        txtTuiKuanFP.SetText(fphm);
    }
    function UCLHShenQingXX_TK_CallbackCommonComplete(rs) {
        //debugger;
        var arr = rs.split('|');
        var type = arr[0];
        var state = arr[1];
        if (state != "0") {
            alert(arr[2]);
        }
        else {

        }
    }
    function Recount() {
        if (isNaN(txtTuiKuanJE.GetText()) || txtTuiKuanJE.GetText() == "") {
            txtTuiKuanJHL.SetText("");
            return;
        }
        var tuikuanjhl = parseFloat(txtTuiKuanJE.GetText()) / parseFloat(txtYSJ.GetText()) / UCLHShenQingXX_TK_hdCollection.Get("I_JIAJIABL");
        txtTuiKuanJHL.SetText(parseInt(tuikuanjhl));
        //txtTuiKuanJHL.SetText(tuikuanjhl);
    }
</script>
<dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="UCLHShenQingXX_TK_hdCollection" runat="server"></dx:ASPxHiddenField>
<dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="UCLHShenQingXX_TK_ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){UCLHShenQingXX_TK_CallbackCommonComplete(e.result);}"></dx:ASPxCallback>
<table style="width: 99%">
    <tr>
        <td style="text-align: right; white-space: nowrap; width: 10.5%">开账日期：
        </td>
        <td style="white-space: nowrap; width: 19%">
            <dx:ASPxTextBox ID="txtKaiZhangRQ" runat="server" Width="100%" Enabled="false"></dx:ASPxTextBox>
        </td>
        <td style="text-align: right; white-space: nowrap; width: 17%">应收金额：
        </td>
        <td style="white-space: nowrap; width: 19%">
            <dx:ASPxTextBox ID="txtYingShouJE" runat="server" Width="100%" HorizontalAlign="Right" Enabled="false"></dx:ASPxTextBox>
        </td>
        <td></td>
        <td style="text-align: right; white-space: nowrap; width: 14.5%">已收金额：
        </td>
        <td style="white-space: nowrap;">
            <dx:ASPxTextBox ID="txtYiShouJE" runat="server" Width="100%" HorizontalAlign="Right" Enabled="false"></dx:ASPxTextBox>
        </td>
    </tr>    
    <tr runat="server" id="trYSJ">
        <td style="text-align: right; white-space: nowrap; width: 10.5%">用户单价：
        </td>
        <td style="white-space: nowrap; width: 19%">
            <dx:ASPxTextBox ID="txtYSJ" ClientInstanceName="txtYSJ" runat="server" HorizontalAlign="Right" Width="100%" ClientEnabled="false" ></dx:ASPxTextBox>
        </td>
        <td style="text-align: right; white-space: nowrap; width: 17%">退款计划量：
        </td>
        <td style="white-space: nowrap; width: 19%">
            <dx:ASPxTextBox ID="txtTuiKuanJHL" ClientInstanceName="txtTuiKuanJHL" runat="server" Width="100%"  ></dx:ASPxTextBox>
        </td>
        <td></td>
        <td style="text-align: right; white-space: nowrap; width: 14.5%">托收状态：
        </td>
        <td style="white-space: nowrap; width: 16.5%">
            <dx:ASPxTextBox ID="txtTuoShou" runat="server" Width="100%"  Enabled="false"></dx:ASPxTextBox>
        </td>
    </tr>
    <tr>
        <td style="text-align: right; white-space: nowrap;">退款金额：
        </td>
        <td style="white-space: nowrap;">
            <dx:ASPxTextBox ID="txtTuiKuanJE" ClientInstanceName="txtTuiKuanJE" runat="server" Width="100%" HorizontalAlign="Right"  ClientSideEvents-LostFocus="function(s,e){Recount();}"></dx:ASPxTextBox>
        </td>
        <td style="text-align: right; white-space: nowrap;">退款发票号码
        </td>
        <td style="white-space: nowrap;">
            <dx:ASPxTextBox ID="txtTuiKuanFP" ClientInstanceName="txtTuiKuanFP" runat="server" Width="100%" Text="" ></dx:ASPxTextBox>
        </td>
        <td>
            <dx:ASPxButton ID="btnOpenFP" runat="server" Text="选择" UseSubmitBehavior="false" ClientSideEvents-Click="function(s,e){openFaPiao();}"></dx:ASPxButton>
        </td>
        <td style="text-align: right; white-space: nowrap;">退款类型：
        </td>
        <td style="white-space: nowrap;">
            <dx:ASPxComboBox ID="cmbTuiKuanLX" runat="server" ValueType="System.String"></dx:ASPxComboBox>
        </td>
    </tr>
    <tr>
        <td style="text-align: right; white-space: nowrap;">银行账号：
        </td>
        <td colspan="6" style="white-space: nowrap;">
            <dx:ASPxTextBox ID="txtYinHangZH" runat="server" Width="100%" ></dx:ASPxTextBox>
        </td>
    </tr>
    <tr>
        <td style="text-align: right; white-space: nowrap;">开户银行：
        </td>
        <td colspan="6" style="white-space: nowrap;">
           <dx:ASPxTextBox ID="txtKaiHuYH" runat="server" Width="100%" ></dx:ASPxTextBox>
        </td>
    </tr>
    <tr>
        <td style="text-align: right; white-space: nowrap;">开户户名：
        </td>
        <td colspan="6" style="white-space: nowrap;">
           <dx:ASPxTextBox ID="txtKaiHuHM" runat="server" Width="100%" ></dx:ASPxTextBox>
        </td>
    </tr>
</table>
